home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 050 / pxg11.arc / MECHANIC.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1985-10-13  |  7.6 KB  |  144 lines

  1.  
  2. {Expert program mechanic.PAS generated by PXG}
  3.  
  4. {$I PXG.INC}
  5.  
  6. begin
  7.    repeat
  8.       writeln;
  9.       writeln('*** EXPERT MECHANIC *** (Rules from Byte, June 1985)');
  10.       writeln;
  11.  
  12.       if ask('Does the engine start?') = true then
  13.          if ask('Does the engine stall?') = true then
  14.             if ask('Any air leaks in or around the intake manifold?') = true then
  15.                conclude('Check the manifold')
  16.  
  17.             else    {Any air leaks in or around the intake manifold? = false}
  18.                if ask('Are the valves set too tight?') = true then
  19.                   conclude('Check the valves')
  20.  
  21.                else    {Are the valves set too tight? = false}
  22.                   if ask('Are the ignition points burned, pitted, or gapped incorrectly?') = true then
  23.                      conclude('Check the points')
  24.  
  25.                   else    {Are the ignition points burned, pitted, or gapped incorrectly? = false}
  26.                      if ask('Is the idle speed set too slow?') = true then
  27.                         conclude('Adjust the idle speed')
  28.  
  29.                      else    {Is the idle speed set too slow? = false}
  30.                         conclude('Check the carb mixture')
  31.  
  32.          else    {Does the engine stall? = false}
  33.             if ask('Does the engine misfire?') = true then
  34.                if ask('Are the spark plugs fouled, damaged, too hot, too cold, or gapped wrong?') = true then
  35.                   conclude('Check the plugs')
  36.  
  37.                else    {Are the spark plugs fouled, damaged, too hot, too cold, or gapped wrong? = false}
  38.                   if ask('Is the head gasket blown?') = true then
  39.                      conclude('Change the head gasket')
  40.  
  41.                   else    {Is the head gasket blown? = false}
  42.                      if ask('Are the points burned, pitted, or incorrectly gapped?') = true then
  43.                         conclude('Check the points')
  44.  
  45.                      else    {Are the points burned, pitted, or incorrectly gapped? = false}
  46.                         if ask('Are the valves worn, sticking, or valve springs broken or weak?') = true then
  47.                            conclude('Check the valves')
  48.  
  49.                         else    {Are the valves worn, sticking, or valve springs broken or weak? = false}
  50.                            if ask('Is carburation poor due to clogged or loose jets, air leaks, or bad mixture?') = true then
  51.                               conclude('Check the carburator')
  52.  
  53.                            else    {Is carburation poor due to clogged or loose jets, air leaks, or bad mixture? = false}
  54.                               if ask('Are there any signs of free gas around the carburator?') = true then
  55.                                  conclude('The float may be sticking')
  56.  
  57.                               else    {Are there any signs of free gas around the carburator? = false}
  58.                                  conclude('Check the ignition timing')
  59.  
  60.             else    {Does the engine misfire? = false}
  61.                if ask('Does the engine lack power or performance?') = true then
  62.                   if ask('Is the ignition timing off?') = true then
  63.                      conclude('Adjust the timing')
  64.  
  65.                   else    {Is the ignition timing off? = false}
  66.                      if ask('Has vacuum advance failed?') = true then
  67.                         conclude('Fix the vacuum advance')
  68.  
  69.                      else    {Has vacuum advance failed? = false}
  70.                         if ask('Are the points burned, pitted, sticking or bouncing?') = true then
  71.                            conclude('Change the points')
  72.  
  73.                         else    {Are the points burned, pitted, sticking or bouncing? = false}
  74.                            conclude('It could be the piston rings')
  75.  
  76.                else    {Does the engine lack power or performance? = false}
  77.                   if ask('Does the engine idle roughly?') = true then
  78.                      conclude('Check the fuel volatility')
  79.  
  80.                   else    {Does the engine idle roughly? = false}
  81.                      conclude('Check the cylinder head')
  82.  
  83.       else    {Does the engine start? = false}
  84.          if ask('Does the starter crank the engine?') = true then
  85.             if ask('Are the points burned, pitted, dirty or fail to function?') = true then
  86.                conclude('Fix the points')
  87.  
  88.             else    {Are the points burned, pitted, dirty or fail to function? = false}
  89.                if ask('Is the coil output weak, nonexistent?') = true then
  90.                   conclude('Change the coil')
  91.  
  92.                else    {Is the coil output weak, nonexistent? = false}
  93.                   if ask('Is the coil resistor burned out or open?') = true then
  94.                      conclude('Change the coil')
  95.  
  96.                   else    {Is the coil resistor burned out or open? = false}
  97.                      if ask('Are the spark plugs damaged, dirty, wet, or gapped incorrectly?') = true then
  98.                         conclude('Change the spark plugs')
  99.  
  100.                      else    {Are the spark plugs damaged, dirty, wet, or gapped incorrectly? = false}
  101.                         if ask('Is the fuel pump worn, leaking, clogged or inoperative?') = true then
  102.                            conclude('Change the fuel pump')
  103.  
  104.                         else    {Is the fuel pump worn, leaking, clogged or inoperative? = false}
  105.                            if ask('Is the choke incorrectly set or inoperative?') = true then
  106.                               conclude('Fix the choke')
  107.  
  108.                            else    {Is the choke incorrectly set or inoperative? = false}
  109.                               if ask('Is it the carb float, jets or needle valve') = true then
  110.                                  conclude('Fix the carburator')
  111.  
  112.                               else    {Is it the carb float, jets or needle valve = false}
  113.                                  if ask('Is the distributor cap, rotor, insulator damaged or wet?') = true then
  114.                                     conclude('Fix the distributor')
  115.  
  116.                                  else    {Is the distributor cap, rotor, insulator damaged or wet? = false}
  117.                                     if ask('Are the ignition cables cracked, wet, corroded?') = true then
  118.                                        conclude('Fix the ignition cables')
  119.  
  120.                                     else    {Are the ignition cables cracked, wet, corroded? = false}
  121.                                        if ask('Does ignition switch remain open when key is turned?') = true then
  122.                                           conclude('Replace the ignition switch or battery')
  123.  
  124.                                        else    {Does ignition switch remain open when key is turned? = false}
  125.                                           conclude('The problem could be in the fuel')
  126.  
  127.          else    {Does the starter crank the engine? = false}
  128.             if ask('Are the battery terminals loose or corroded?') = true then
  129.                conclude('Fix the terminals')
  130.  
  131.             else    {Are the battery terminals loose or corroded? = false}
  132.                if ask('Does the starter motor fail to operate when power is applied directly?') = true then
  133.                   conclude('Replace the starter')
  134.  
  135.                else    {Does the starter motor fail to operate when power is applied directly? = false}
  136.                   if ask('Does starter drive gear fail to engage flywheel?') = true then
  137.                      conclude('Replace the solenoid')
  138.  
  139.                   else    {Does starter drive gear fail to engage flywheel? = false}
  140.                      conclude('Replace the battery')
  141.  
  142.    until ask('Run again?') = false;
  143. end.
  144.